package day03;

import java.util.Scanner;

public class L0301 {
    public static void main (String[] args) {
        Scanner p=new Scanner (System.in);
        String input=p.nextLine ();
        System.out.println (longnumber (input));

    }

    public static String longnumber( String input){
        String numb="";
        String current="";
        for (int i = 0; i < input.length (); i++) {
            char c=input.charAt (i);
            if(Character.isDigit (c)){
                current+=c;
            }else{
                //更新数字字符串
                if(current.length ()>numb.length ()){
                    numb=current;
                }
                //走到这一步说明 1.已经更新完 2.长度不如原来的长  对current进行归零
                current="";
            }
        }
        //更新操作的触发是因为遇到了非数字字符
        //对末尾是数字字符的情况进行再检查
        if(current.length ()>numb.length ()) numb=current;

        return numb;
    }
}
